package table.models;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.WindowConstants;

import print.Printer;
import core.GuiComponentLabels;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class TestFrame extends javax.swing.JFrame {
	private final JTable jTable1;
	private JScrollPane jScrollPane1;
	private JButton jButton1;
	private JPanel jPanel1;
	private JPanel jPanel2;

	/**
	 * Auto-generated main method to display this JFrame
	 */

	public TestFrame(JTable table) {
		super();
		this.jTable1 = table;
		this.initGUI();
	}

	private void initGUI() {
		try {
			BorderLayout thisLayout = new BorderLayout();
			this.getContentPane().setLayout(thisLayout);
			this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				this.jPanel1 = new JPanel();
				BorderLayout jPanel1Layout = new BorderLayout();
				this.jPanel1.setLayout(jPanel1Layout);
				{
					this.jButton1 = new JButton();
					this.jPanel1.add(this.jButton1, BorderLayout.CENTER);
					this.jButton1.setText("jButton1");
					this.jButton1.setPreferredSize(new java.awt.Dimension(384, 34));
					this.jButton1.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							new Printer(TestFrame.this.jTable1, GuiComponentLabels.PARTICIPANTS);
						}
					});
				}
			}
			{
				this.jPanel2 = new JPanel();
				this.getContentPane().add(this.jPanel2, BorderLayout.CENTER);
				this.getContentPane().add(this.jPanel1, BorderLayout.NORTH);
				BorderLayout buttonWrapperPanelLayout = new BorderLayout();
				this.jPanel2.setLayout(buttonWrapperPanelLayout);
				{
					this.jScrollPane1 = new JScrollPane();
					this.jPanel2.add(this.jScrollPane1, BorderLayout.CENTER);
					this.jScrollPane1.setPreferredSize(new java.awt.Dimension(384, 123));
					{

						this.jScrollPane1.setViewportView(this.jTable1);

					}
				}
			}
			this.pack();
			this.setSize(400, 278);
		} catch (Exception e) {
			// add your error handling code here
			e.printStackTrace();
		}
	}

}
